﻿using System;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace CommonDevelop.Cache
{
    public interface IDCSCache
    {
        bool Add(string key, object value, TimeSpan? expiresIn = null, bool isSliding = false);
        bool Exists(string key);
        object Get(string key);
        IDictionary<string, object> GetAll(IEnumerable<string> keys);
        Task<T> GetAsync<T>(string key) where T : class;
        bool Remove(string key);
        void RemoveAll(IEnumerable<string> keys);
        bool Replace(string key, object value, TimeSpan? expiresIn = null, bool isSliding = false);
    }
}
